import { getToken, setToken } from "@/utils/storage";

//登录
const user = {
  namespaced: true,
  state: {
    token: getToken(),
  },
  mutations: {
    setToken(state, newToken) {
      setToken(newToken);
      state.token = newToken;
    },
  },
};
export default user;
